<?php

require_once 'Zend/View/Helper/Abstract.php';

class Core_View_Helper_Controls_SelectDoctype extends Zend_View_Helper_Abstract
{
    /**
     *
     */
    public function selectDoctype($name, $value, $attribs = null)
    {
        $options = array(
            'XHTML1_TRANSITIONAL' => 'XHTML1_TRANSITIONAL',
            'XHTML11'             => 'XHTML11',
            'XHTML1_STRICT'       => 'XHTML1_STRICT',
            'XHTML1_FRAMESET'     => 'XHTML1_FRAMESET',
            'XHTML_BASIC1'        => 'XHTML_BASIC1',
            'HTML4_STRICT'        => 'HTML4_STRICT',
            'HTML4_LOOSE'         => 'HTML4_LOOSE',
            'HTML4_FRAMESET'      => 'HTML4_FRAMESET'
        );
        $form = new Core_Form();
        $select = $form->createElement('select', $name, array(
            'multiOptions'  => $options,
            'value'         => $value,
        ));
        if (is_array($attribs)) {
            $select->setAttribs($attribs);
        }
        return $select;
    }
}